import { NgModule } from '@angular/core';
import { Storage } from '@ionic/storage';
import { IonicApp, IonicModule } from 'ionic-angular';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { MissionPage } from '../pages/mission/mission';
import { SignupPage } from '../pages/signup/signup';
import { CreditsPage } from '../pages/credits/credits';
import { RegisterPage } from '../pages/register/register';
import { ProfilePage } from '../pages/profile/profile';
import { EditProfilePage } from '../pages/profile/edit/edit';
import { SettingPage } from '../pages/setting/setting';
import { LevelPage } from '../pages/level/level';

// pipes
import { IncreasablePipe } from '../pipes/increasable';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    MissionPage,
    SignupPage,
    CreditsPage,
    RegisterPage,
    ProfilePage,
    EditProfilePage,
    SettingPage,
    LevelPage,
    IncreasablePipe
  ],
  imports: [
    IonicModule.forRoot(MyApp, {}, {
      links: [
        { component: HomePage, name: 'Home', segment: 'home' },
        { component: MissionPage, name: 'Mission', segment: 'mission' },
        { component: SignupPage, name: 'Signup', segment: 'signup' },
        { component: CreditsPage, name: 'Credits', segment: 'credits/:integral' },
        { component: RegisterPage, name: 'Register', segment: 'register' },
        { component: ProfilePage, name: 'Profile', segment: 'profile' },
        { component: EditProfilePage, name: 'EditProfile', segment: 'edit/:profile' },
        { component: SettingPage, name: 'setting', segment: 'setting' },
        { component: LevelPage, name: 'Level', segment: 'level/:level/:exp' }
      ]
    })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    MissionPage,
    SignupPage,
    CreditsPage,
    RegisterPage,
    ProfilePage,
    EditProfilePage,
    SettingPage,
    LevelPage
  ],
  providers: [Storage]
})
export class AppModule { }
